import request from '/@/utils/request';

export function useTenantApi() {
	return {
		tenantPage(params) {
			return request({
				url: '/api/tenant/v1/tenant/page',
				method: 'get',
				params: params
			})
		},
		tenantSelect() {
			return request({
				url: '/api/tenant/v1/tenant/select',
				method: 'get',
			})
		},
		tenantInfo(id) {
			return request({
				url: `/api/tenant/v1/tenant/info/${id}`,
				method: 'get',
			})
		},
		tenantAdd(params) {
			return request({
				url: '/api/tenant/v1/tenant/add',
				method: 'post',
				data: params
			})
		},
		tenantUpdate(params) {
			return request({
				url: '/api/tenant/v1/tenant/update',
				method: 'put',
				data: params
			})
		},
		tenantDelete(tenantId) {
			return request({
				url: `/api/tenant/v1/tenant/delete/${tenantId}`,
				method: 'delete',
			})
		},
		tenantMaxId() {
			return request({
				url: `/api/tenant/v1/tenant/maxid`,
				method: 'get',
			})
		},





		tenantRolePage(params) {
			return request({
				url: '/api/tenant/v1/role/page',
				method: 'get',
				params: params
			})
		},
		tenantRoleSelect() {
			return request({
				url: '/api/tenant/v1/role/select',
				method: 'get',
			})
		},
		tenantRoleInfo(id) {
			return request({
				url: `/api/tenant/v1/role/info/${id}`,
				method: 'get',
			})
		},
		tenantRoleAdd(params) {
			return request({
				url: '/api/tenant/v1/role/add',
				method: 'post',
				data: params
			})
		},
		tenantRoleUpdate(params) {
			return request({
				url: '/api/tenant/v1/role/update',
				method: 'put',
				data: params
			})
		},
		tenantRoleDelete(tenantId) {
			return request({
				url: `/api/tenant/v1/role/delete/${tenantId}`,
				method: 'delete',
			})
		},


		tenantSuperAdminPage(params) {
			return request({
				url: `/api/tenant/v1/admin/page`,
				method: 'get',
				params
			})
		},
		tenantSuperAdminInfo(id) {
			return request({
				url: `/api/tenant/v1/admin/info/${id}`,
				method: 'get',
			})
		},
		tenantSuperAdminAdd(data) {
			return request({
				url: `/api/tenant/v1/admin/add`,
				method: 'post',
				data
			})
		},
		tenantSuperAdminUpdate(data) {
			return request({
				url: `/api/tenant/v1/admin/update`,
				method: 'put',
				data
			})
		},
		tenantSuperAdminDelete(data) {
			return request({
				url: `/api/tenant/v1/admin/delete`,
				method: 'delete',
				data
			})
		}
	}

}
